From 7e3f82ea5e4abae5d28e58d90f7c2b54f109eb6a Mon Sep 17 00:00:00 2001 From: "jws@cairnwell.research" Date: Thu, 10 Apr 2003 11:06:11 +0000 Subject: [PATCH] bitkeeper revision 1.164 (3e955023D4pXlN3OeywA3uvFrE7d9g) few megaraid changes --- xen/drivers/scsi/Makefile | 6 ++++-- xen/drivers/scsi/megaraid.c | 8 +++++++- xen/drivers/scsi/megaraid.h | 3 +++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/xen/drivers/scsi/Makefile b/xen/drivers/scsi/Makefile index 5753581b47..874b26a4c6 100644 --- a/xen/drivers/scsi/Makefile +++ b/xen/drivers/scsi/Makefile @@ -1,11 +1,13 @@ include $(BASEDIR)/Rules.mk +# naive OBJS rule gets link order wrong +SCSIOBJS := scsi.o hosts.o scsicam.o scsi_dma.o scsi_error.o scsi_ioctl.o scsi_lib.o scsi_merge.o scsi_proc.o scsi_queue.o scsi_scan.o scsi_syms.o constants.o sd.o aacraid/aacraid.o aic7xxx/aic7xxx.o megaraid.o + default: $(OBJS) $(MAKE) -C aacraid $(MAKE) -C aic7xxx - $(LD) -r -o driver.o $(OBJS) aacraid/aacraid.o aic7xxx/aic7xxx.o -# $(LD) -r -o driver.o $(OBJS) + $(LD) -r -o driver.o $(SCSIOBJS) clean: $(MAKE) -C aacraid clean diff --git a/xen/drivers/scsi/megaraid.c b/xen/drivers/scsi/megaraid.c index 26c25a197a..13b0aded8a 100644 --- a/xen/drivers/scsi/megaraid.c +++ b/xen/drivers/scsi/megaraid.c @@ -3118,9 +3118,11 @@ static int mega_findCard (Scsi_Host_Template * pHostTmpl, megaCfg->lock_pend = SPIN_LOCK_UNLOCKED; megaCfg->lock_scsicmd = SPIN_LOCK_UNLOCKED; megaCfg->flag = flag; +#if XENO_KILLED_DELLOGDRV megaCfg->int_qh = NULL; megaCfg->int_qt = NULL; megaCfg->int_qlen = 0; +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) megaCfg->dev = pdev; @@ -3955,7 +3957,9 @@ int megaraid_queue (Scsi_Cmnd * SCpnt, void (*pktComp) (Scsi_Cmnd *)) * logical drive opertion. If it is, queue the commands in the * internal queue until the delete operation is complete. */ +#if XENO_KILLED_DELLOGDRV if( ! megaCfg->quiescent ) { +#endif /* Add SCB to the head of the pending queue */ if (megaCfg->qPendingH == NULL) { megaCfg->qPendingH = megaCfg->qPendingT = pScb; @@ -3970,6 +3974,7 @@ int megaraid_queue (Scsi_Cmnd * SCpnt, void (*pktComp) (Scsi_Cmnd *)) DRIVER_UNLOCK (megaCfg); return 0; } +#if XENO_KILLED_DELLOGDRV } else { /* Add SCB to the internal queue */ @@ -3982,6 +3987,7 @@ int megaraid_queue (Scsi_Cmnd * SCpnt, void (*pktComp) (Scsi_Cmnd *)) megaCfg->int_qt->next = NULL; megaCfg->int_qlen++; } +#endif if (pScb->SCpnt->cmnd[0] == M_RD_IOCTL_CMD_NEW) { #if XENO_KILLED @@ -5329,7 +5335,7 @@ static int mega_del_logdrv(mega_host_config *this_hba, int logdrv) { return -ENOSYS; -#if XENO_KILLED +#if XENO_KILLED_DELLOGDRV int rval; IO_LOCK_T; DECLARE_WAIT_QUEUE_HEAD(wq); diff --git a/xen/drivers/scsi/megaraid.h b/xen/drivers/scsi/megaraid.h index a84a7ac900..cb8c9aba9e 100644 --- a/xen/drivers/scsi/megaraid.h +++ b/xen/drivers/scsi/megaraid.h @@ -236,6 +236,7 @@ present: 0, /* Present */\ unchecked_isa_dma: 0, /* Default Unchecked ISA DMA */\ use_clustering: ENABLE_CLUSTERING, /* Enable Clustering */\ + use_new_eh_code: 1, /* Uses new error handling code */\ } #endif // XENO: REMOVED command: megaraid_command, /* Command Function */ @@ -802,6 +803,7 @@ typedef struct _mega_host_config { int support_random_del; /* Do we support random deletion of logdrvs */ int read_ldidmap; /* set after logical drive deltion. The logical drive number must be read from the map */ +#if XENO_KILLED_DELLOGDRV int quiescent; /* a stage reached when delete logical drive needs to be done. Stop sending requests to the hba till delete operation is completed */ @@ -809,6 +811,7 @@ typedef struct _mega_host_config { mega_scb *int_qh; /* commands are queued in the internal queue */ mega_scb *int_qt; /* while the hba is quiescent */ int int_qlen; +#endif char logdrv_chan[MAX_CHANNEL+NVIRT_CHAN]; /* logical drive are on what channels. */ int mega_ch_class; -- 2.30.2